import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import i18n from './i18n/'
import 'app/global'
import 'app/event-bus'
import enums from 'app/enum'
import permission from 'app/permission'
import './plugins'
import 'app/validator'
import 'app/formatter'
import 'assets/css/reset.css'
import 'assets/js/iconfont.js'
import 'styles/index.scss'
import 'components'
import 'utils'

// 注册Enum
Vue.use(enums)

// 注册权限指令
Vue.use(permission)

const req = require.context('@/assets/svg-icon', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)

Vue.use(i18n)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
